package com.itfreer.bpm.timeliness.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.beans.BeanUtils;

import com.itfreer.form.api.JdbcBaseEntity;
/**
 * 审批历史信息表
 */
@Entity(name = "bpm_task_timeliness")
@Table(indexes = { @Index(name = "timet_task_defname", columnList = "task_defname"),
		@Index(name = "timet_task_defid", columnList = "task_defid"),
		@Index(name = "timet_task_order", columnList = "task_order"),
		@Index(name = "timet_s_exeid", columnList = "s_exeid"),
		@Index(name = "timet_s_business", columnList = "s_business"),
		@Index(name = "timet_tl_type", columnList = "tl_type")})
public class JdbcTaskTimeLinessEntity implements JdbcBaseEntity<TaskTimeLinessEntity>, Serializable{
	private static final long serialVersionUID = 4673423560339517162L;
	
	/**
	 * 数据库主键
	 */
	@Id
	@Column(name="s_id")
	private String id;
	/**
	 * 任务节点id
	 */
	@Column(name="task_defid")
	private String taskdefid;
	/**
	 * 任务名称
	 */
	@Column(name="task_defname")
	private String taskdefname;
	/**
	 * 流程定义id
	 */
	@Column(name="act_defid")
	private String actdefid;
	/**
	 * 流程定义名称
	 */
	@Column(name="act_defname")
	private String actdefname;
	
	/**
	 * 任务排序
	 */
	@Column(name="task_order")
	private Integer taskorder;
	/**
	 * 任务限时
	 */
	@Column(name="task_tl")
	private Double tasktl;
	/**
	 * 任务分组
	 */
	@Column(name="task_group")
	private String taskgroup;
	/**
	 * 流程实例Id
	 */
	@Column(name="s_exeid")
	private String sexeid;
	
	/**
	 * 项目地址
	 */
	@Column(name="prj_url")
	private String prjurl;
	
	/**
	 * 表单名称
	 */
	@Column(name="prj_forname")
	private String prjforname;
	
	/**
	 * 表单视图
	 * 
	 */
	@Column(name="prj_vi")
	private String prjvi;
	/**
	 * 项目名称
	 */
	@Column(name="s_business")
	private String sbusiness;
	/**
	 * 项目主键
	 */
	@Column(name="s_bussiness_id")
	private String sbussinessid;
	
	/**
	 * 节点启动时间
	 */
	@Column(name="start_time")
	private Date starttime;
	
	/**
	 * 节点结束时间
	 */
	@Column(name="end_time")
	private Date endtime;
	
	/**
	 * 时效时间
	 */
	@Column(name="tl_time")
	private Long tltime;
	
	/**
	 * 时效说明
	 */
	@Column(name="tl_caption")
	private String tlcaption;
	
	/**
	 * 时效类型（0未超时，1超时）
	 */
	@Column(name="tl_type")
	private String tltype;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTaskdefid() {
		return taskdefid;
	}

	public void setTaskdefid(String taskdefid) {
		this.taskdefid = taskdefid;
	}

	public String getTaskdefname() {
		return taskdefname;
	}

	public void setTaskdefname(String taskdefname) {
		this.taskdefname = taskdefname;
	}

	public String getActdefid() {
		return actdefid;
	}

	public void setActdefid(String actdefid) {
		this.actdefid = actdefid;
	}

	public String getActdefname() {
		return actdefname;
	}

	public void setActdefname(String actdefname) {
		this.actdefname = actdefname;
	}

	public Integer getTaskorder() {
		return taskorder;
	}

	public void setTaskorder(Integer taskorder) {
		this.taskorder = taskorder;
	}

	public Double getTasktl() {
		return tasktl;
	}

	public void setTasktl(Double tasktl) {
		this.tasktl = tasktl;
	}

	public String getTaskgroup() {
		return taskgroup;
	}

	public void setTaskgroup(String taskgroup) {
		this.taskgroup = taskgroup;
	}

	public String getSexeid() {
		return sexeid;
	}

	public void setSexeid(String sexeid) {
		this.sexeid = sexeid;
	}

	public String getPrjurl() {
		return prjurl;
	}

	public void setPrjurl(String prjurl) {
		this.prjurl = prjurl;
	}

	public String getPrjforname() {
		return prjforname;
	}

	public void setPrjforname(String prjforname) {
		this.prjforname = prjforname;
	}

	public String getPrjvi() {
		return prjvi;
	}

	public void setPrjvi(String prjvi) {
		this.prjvi = prjvi;
	}

	public String getSbusiness() {
		return sbusiness;
	}

	public void setSbusiness(String sbusiness) {
		this.sbusiness = sbusiness;
	}

	public String getSbussinessid() {
		return sbussinessid;
	}

	public void setSbussinessid(String sbussinessid) {
		this.sbussinessid = sbussinessid;
	}

	public Date getStarttime() {
		return starttime;
	}

	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}

	public Date getEndtime() {
		return endtime;
	}

	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}

	public Long getTltime() {
		return tltime;
	}

	public void setTltime(Long tltime) {
		this.tltime = tltime;
	}

	public String getTlcaption() {
		return tlcaption;
	}

	public void setTlcaption(String tlcaption) {
		this.tlcaption = tlcaption;
	}

	public String getTltype() {
		return tltype;
	}

	public void setTltype(String tltype) {
		this.tltype = tltype;
	}

	@Override
	public void from(TaskTimeLinessEntity t) {
		BeanUtils.copyProperties(t, this);
	}

	@Override
	public TaskTimeLinessEntity toEntity() {
		TaskTimeLinessEntity toEntity = new TaskTimeLinessEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}
	
	
}
